package cn.com.cabinet.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.cabinet.web.entity.Cabinet;

public interface CabinetDao extends JpaRepository<Cabinet, Long>,JpaSpecificationExecutor<Cabinet>{

	@Query("select c from Cabinet c where c.cId=?1")
	public Cabinet getCabinetByCid(String cId);
	
	
	@Query("select c from Cabinet c where c.cId=?1 and sellerId=?2")
	public Cabinet getCabinetByCidAndSellerId(String cId,Long sellerId);
	
}
